<%--
  Created by IntelliJ IDEA.
  User: ringo
  Date: 2025/10/24
  Time: 09:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<link rel="icon" href="${pageContext.request.contextPath}/images/library.ico" type="image/x-icon">
<header>
    <div class="header">
        <a href="/">
            <h1>📚 图书馆管理系统</h1>
        </a>
        <div class="time">
            <span id="currentTime"></span>
        </div>
    </div>
</header>
<script>
    // 实时更新时间
    function updateTime() {
        const now = new Date();
        const formatted = now.getFullYear() + "年" +
            (now.getMonth() + 1).toString().padStart(2, '0') + "月" +
            now.getDate().toString().padStart(2, '0') + "日 " +
            now.getHours().toString().padStart(2, '0') + ":" +
            now.getMinutes().toString().padStart(2, '0') + ":" +
            now.getSeconds().toString().padStart(2, '0');
        document.getElementById("currentTime").innerText = formatted;
    }

    setInterval(updateTime, 1000);
</script>